package com.zoe.springcloud.service;/*
 *@date 2019/12/14 0014
 */

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author xjr
 */
@FeignClient(value = "provider",fallback=FeignServiceHystrix.class)
public interface FeignService {

    //如果feign代理的是get请求的话，那么每一个参数都必须加上@requestaram注解，否则默认是发送post请求，会导致调用失败，并且@requestparam注解的参数名不能省略
    @RequestMapping(value = "/provide/hello",method = RequestMethod.GET)
   public String feignGet(@RequestParam("message") String message);

}
